<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        const obj = {
            name: '张三',
            like: ['篮球', '电影'] 
        }
        Object.freeze(obj)//浅层 不可改变
        //obj.like[0]='乒乓球'
        //让obj不可以被改变？
        obj.name = '111'
        
        obj.like.unshift('乒乓球');//unshift在数组的首位加上
        console.log(obj);
    </script>
</body>
</html>